package com.ruoyi.test.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.test.mapper.YCategoryMapper;
import com.ruoyi.test.domain.YCategory;
import com.ruoyi.test.service.IYCategoryService;

/**
 * 商品类别Service业务层处理
 * 
 * @author ymf
 * @date 2021-08-08
 */
@Service
public class YCategoryServiceImpl implements IYCategoryService 
{
    @Autowired
    private YCategoryMapper yCategoryMapper;

    /**
     * 查询商品类别
     * 
     * @param id 商品类别主键
     * @return 商品类别
     */
    @Override
    public YCategory selectYCategoryById(Integer id)
    {
        return yCategoryMapper.selectYCategoryById(id);
    }

    /**
     * 查询商品类别列表
     * 
     * @param yCategory 商品类别
     * @return 商品类别
     */
    @Override
    public List<YCategory> selectYCategoryList(YCategory yCategory)
    {
        return yCategoryMapper.selectYCategoryList(yCategory);
    }

    /**
     * 新增商品类别
     * 
     * @param yCategory 商品类别
     * @return 结果
     */
    @Override
    public int insertYCategory(YCategory yCategory)
    {
        return yCategoryMapper.insertYCategory(yCategory);
    }

    /**
     * 修改商品类别
     * 
     * @param yCategory 商品类别
     * @return 结果
     */
    @Override
    public int updateYCategory(YCategory yCategory)
    {
        return yCategoryMapper.updateYCategory(yCategory);
    }

    /**
     * 批量删除商品类别
     * 
     * @param ids 需要删除的商品类别主键
     * @return 结果
     */
    @Override
    public int deleteYCategoryByIds(Integer[] ids)
    {
        return yCategoryMapper.deleteYCategoryByIds(ids);
    }

    /**
     * 删除商品类别信息
     * 
     * @param id 商品类别主键
     * @return 结果
     */
    @Override
    public int deleteYCategoryById(Integer id)
    {
        return yCategoryMapper.deleteYCategoryById(id);
    }
}
